#ifndef _GARRAY_H_
#define _GARRAY_H_
#include "smartall.h"
class garray {
 public:
  garray();
  garray(const char *);
  garray(const garray&);
  garray(const char c) { Put(c); }
  void Put(int);
  void resize();
  int size() const { return _cur_size; }
  int max_size() const { return _max_size; }
  char * table_array() { _table[_cur_size] = 0; return _table; }
  char& operator[](int) const;
  garray& operator-=(int a);
  int operator==(const garray&);
  garray& operator+=(const garray&);
  char * strstr(garray&);
  void clear();
  garray & operator<<(const garray& g) { *this += g; return *this; }
  garray & operator<<(const char * s) { *this += s; return *this; }
  garray & operator<<(const char c) { *this += c; return *this; }
  friend ostream & operator<<(ostream &o, const garray &x);
 private:
  char * _table;
  int _cur_size;
  int _max_size;
};
#endif
